home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11896 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Question-how print time from unix
  5. Date: Wed, 27 Mar 96 12:43:16 GMT
  6. Organization: none
  7. Message-ID: <827930596snz@genesis.demon.co.uk>
  8. References: <4jahpf$dpp@cloner2.ix.netcom.com>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4jahpf$dpp@cloner2.ix.netcom.com>
  15.            martypro@ix.netcom.com "Marty" writes:
  16.  
  17. >Ok here is a dumb question I'm sure:
  18. >
  19. >Below is the relevant code I am using to input the time into a structure 
  20. >element and can't find the appropriate conversion character to use with 
  21. >printf to print it, that is if that is how you print it.  Any help you 
  22. >can give me will be greatly appreciated.
  23.  
  24. printf() can't format date/time strings from a time_t value. For that
  25. you should look at ctime(), gmtime(), localtime(), asctime() and strftime().
  26.  
  27. -- 
  28. -----------------------------------------
  29. Lawrence Kirby | fred@genesis.demon.co.uk
  30. Wilts, England | 70734.126@compuserve.com
  31. -----------------------------------------
  32.